var lis = document.querySelectorAll('.btn');
var a = document.querySelectorAll('ul>a');

function fn(num){
	
	for(var i=0;i<lis.length;i++){
		lis[i].index = i;
		lis[i].style.background = '';
		a[i].style.color = '#777';
	}
	if(num != 0){
		lis[0].style.background = 'url(../index/img/home.png) no-repeat center 0.1rem';
		lis[0].style.backgroundSize = 'auto 0.5rem';
	}
	a[num].style.color = '#ffd600';
	lis[num].style.background = 'url(../index/img/' + num + '.png) no-repeat center 0.1rem';
	lis[num].style.backgroundSize = 'auto 0.5rem';	
}

